﻿using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;

namespace Advance.MvcApp
{
    public class Program
    {
        public static void Main(string[] args)
        {
            BuildWebHost(args).Run();
        }

        public static IWebHost BuildWebHost(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
              .ConfigureAppConfiguration(opt =>
              {
                  opt.AddJsonFile("appsettings.json");
                  opt.AddCommandLine(args);
              })
              .UseUrls("http://localhost:5001")
                .UseStartup<Startup>()
                .Build();
    }
}
